// C++ author 清晨与猫鱼
#include <iostream>
#include <string>
#include "Realize.h"

using namespace std;

int main(const int argc, const char** argv)
{	
    // 上下文
	Context context;

    // 加法
    OperationAdd operationAdd;

    // 设置一个策略
    context.setStrategy(&operationAdd);

    // 执行
    cout << "10 + 5 = " << context.executeStrategy(10 ,5) << endl;

    OperationSubstract operationSubstract;

    context.setStrategy(&operationSubstract);

    cout << "10 - 5 = " << context.executeStrategy(10 ,5) << endl;

    OperationMultiply operationMultiply;

    context.setStrategy(&operationMultiply);

    cout << "10 * 5 = " << context.executeStrategy(10 ,5) << endl;


}